Skip to content

refactor(parameters): move table seeding into AwsCustomResource #1317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

dreamorosi
Copy link
Contributor

@dreamorosi dreamorosi commented Feb 21, 2023

Description of your changes

As explained in the linked issue (#1315), the current implementation of the tests relies on the AWS SDK to seed the DynamoDB Tables created as part of DynamoDBProvider's integration tests. These inserts are done as part of the setup stage (beforeAll in Jest). This means that the IAM role/identity used is the one assumed by the GitHub Actions worker and obtained via OIDC connector.

In order to avoid granting additional permissions to the role assumed by the GitHub Actions worker, this moves the PutItem actions in a series of CDK-managed custom resources so that they are performed as part of the stack deployment and using the same role assumed by CDK itself.

Once merged this PR will close #1315.

How to verify this change

See successful result of integration tests:
image

Related issues, RFCs

Issue number: #1315

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dreamorosi dreamorosi self-assigned this Feb 21, 2023
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Feb 21, 2023
@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Feb 21, 2023
@dreamorosi dreamorosi added tests PRs that add or change tests and removed feature PRs that introduce new features or minor changes labels Feb 21, 2023
@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Feb 21, 2023
@dreamorosi dreamorosi removed the feature PRs that introduce new features or minor changes label Feb 21, 2023
@dreamorosi dreamorosi merged commit bc9b1d4 into main Feb 21, 2023
@dreamorosi dreamorosi deleted the refactor/test/parameters branch February 21, 2023 15:04
@github-actions github-actions bot added the feature PRs that introduce new features or minor changes label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature PRs that introduce new features or minor changes size/L PRs between 100-499 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: move table seeding into custom resource
1 participant